Optimal. Leaf size=713 \[ \frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{2 a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )^2}+\frac {x \left (a b^3 e-4 a^2 c^2 d (1-4 n)+5 a b^2 c d (1-3 n)-2 a^2 b c e (2-3 n)-b^4 d (1-2 n)+c \left (a b^2 e+2 a b c d (2-7 n)-4 a^2 c e (1-3 n)-b^3 d (1-2 n)\right ) x^n\right )}{2 a^2 \left (b^2-4 a c\right )^2 n^2 \left (a+b x^n+c x^{2 n}\right )}+\frac {c \left (a b^2 \left (\sqrt {b^2-4 a c} e+6 c d (1-3 n)\right ) (1-n)+b^3 \left (a e-\sqrt {b^2-4 a c} d (1-2 n)\right ) (1-n)-b^4 d \left (1-3 n+2 n^2\right )-2 a b c \left (2 a e \left (1-n-3 n^2\right )-\sqrt {b^2-4 a c} d \left (2-9 n+7 n^2\right )\right )-4 a^2 c \left (\sqrt {b^2-4 a c} e \left (1-4 n+3 n^2\right )+2 c d \left (1-6 n+8 n^2\right )\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^2 \left (b^2-4 a c-b \sqrt {b^2-4 a c}\right ) n^2}-\frac {c \left (a b^2 \left (\sqrt {b^2-4 a c} e-6 c d (1-3 n)\right ) (1-n)-b^3 \left (a e+\sqrt {b^2-4 a c} d (1-2 n)\right ) (1-n)+b^4 d \left (1-3 n+2 n^2\right )+2 a b c \left (2 a e \left (1-n-3 n^2\right )+\sqrt {b^2-4 a c} d \left (2-9 n+7 n^2\right )\right )-4 a^2 c \left (\sqrt {b^2-4 a c} e \left (1-4 n+3 n^2\right )-2 c d \left (1-6 n+8 n^2\right )\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^2 \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right ) n^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.14, antiderivative size = 713, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1444, 1436,
251} \begin {gather*} \frac {x \left (c x^n \left (-4 a^2 c e (1-3 n)+a b^2 e+2 a b c d (2-7 n)+b^3 (-d) (1-2 n)\right )-2 a^2 b c e (2-3 n)-4 a^2 c^2 d (1-4 n)+a b^3 e+5 a b^2 c d (1-3 n)-b^4 d (1-2 n)\right )}{2 a^2 n^2 \left (b^2-4 a c\right )^2 \left (a+b x^n+c x^{2 n}\right )}+\frac {c x \left (-4 a^2 c \left (e \left (3 n^2-4 n+1\right ) \sqrt {b^2-4 a c}+2 c d \left (8 n^2-6 n+1\right )\right )-2 a b c \left (2 a e \left (-3 n^2-n+1\right )-d \left (7 n^2-9 n+2\right ) \sqrt {b^2-4 a c}\right )+a b^2 (1-n) \left (e \sqrt {b^2-4 a c}+6 c d (1-3 n)\right )+b^3 (1-n) \left (a e-d (1-2 n) \sqrt {b^2-4 a c}\right )+b^4 (-d) \left (2 n^2-3 n+1\right )\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{2 a^2 n^2 \left (b^2-4 a c\right )^2 \left (-b \sqrt {b^2-4 a c}-4 a c+b^2\right )}-\frac {c x \left (-4 a^2 c \left (e \left (3 n^2-4 n+1\right ) \sqrt {b^2-4 a c}-2 c d \left (8 n^2-6 n+1\right )\right )+2 a b c \left (d \left (7 n^2-9 n+2\right ) \sqrt {b^2-4 a c}+2 a e \left (-3 n^2-n+1\right )\right )+a b^2 (1-n) \left (e \sqrt {b^2-4 a c}-6 c d (1-3 n)\right )-b^3 (1-n) \left (d (1-2 n) \sqrt {b^2-4 a c}+a e\right )+b^4 d \left (2 n^2-3 n+1\right )\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{2 a^2 n^2 \left (b^2-4 a c\right )^2 \left (b \sqrt {b^2-4 a c}-4 a c+b^2\right )}+\frac {x \left (c x^n (b d-2 a e)-a b e-2 a c d+b^2 d\right )}{2 a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 251
Rule 1436
Rule 1444
Rubi steps
\begin {align*} \int \frac {d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^3} \, dx &=\frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{2 a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )^2}-\frac {\int \frac {-a b e-2 a c d (1-4 n)+b^2 (d-2 d n)+c (b d-2 a e) (1-3 n) x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx}{2 a \left (b^2-4 a c\right ) n}\\ &=\frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{2 a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )^2}+\frac {x \left (a b^3 e-4 a^2 c^2 d (1-4 n)+5 a b^2 c d (1-3 n)-2 a^2 b c e (2-3 n)-b^4 d (1-2 n)+c \left (a b^2 e+2 a b c d (2-7 n)-4 a^2 c e (1-3 n)-b^3 d (1-2 n)\right ) x^n\right )}{2 a^2 \left (b^2-4 a c\right )^2 n^2 \left (a+b x^n+c x^{2 n}\right )}+\frac {\int \frac {2 a^2 b c e (2-5 n)-a b^3 e (1-n)+b^4 d \left (1-3 n+2 n^2\right )+4 a^2 c^2 d \left (1-6 n+8 n^2\right )-a b^2 c d \left (5-21 n+16 n^2\right )-c \left (a b^2 e+2 a b c d (2-7 n)-4 a^2 c e (1-3 n)-b^3 d (1-2 n)\right ) (1-n) x^n}{a+b x^n+c x^{2 n}} \, dx}{2 a^2 \left (b^2-4 a c\right )^2 n^2}\\ &=\frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{2 a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )^2}+\frac {x \left (a b^3 e-4 a^2 c^2 d (1-4 n)+5 a b^2 c d (1-3 n)-2 a^2 b c e (2-3 n)-b^4 d (1-2 n)+c \left (a b^2 e+2 a b c d (2-7 n)-4 a^2 c e (1-3 n)-b^3 d (1-2 n)\right ) x^n\right )}{2 a^2 \left (b^2-4 a c\right )^2 n^2 \left (a+b x^n+c x^{2 n}\right )}-\frac {\left (c \left (a b^2 \left (\sqrt {b^2-4 a c} e-6 c d (1-3 n)\right ) (1-n)-b^3 \left (a e+\sqrt {b^2-4 a c} d (1-2 n)\right ) (1-n)+b^4 d \left (1-3 n+2 n^2\right )+2 a b c \left (2 a e \left (1-n-3 n^2\right )+\sqrt {b^2-4 a c} d \left (2-9 n+7 n^2\right )\right )-4 a^2 c \left (\sqrt {b^2-4 a c} e \left (1-4 n+3 n^2\right )-2 c d \left (1-6 n+8 n^2\right )\right )\right )\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{4 a^2 \left (b^2-4 a c\right )^{5/2} n^2}-\frac {\left (c \left (a b^2 \left (\sqrt {b^2-4 a c} e+6 c d (1-3 n)\right ) (1-n)+b^3 \left (a e-\sqrt {b^2-4 a c} d (1-2 n)\right ) (1-n)-b^4 d \left (1-3 n+2 n^2\right )-2 a b c \left (2 a e \left (1-n-3 n^2\right )-\sqrt {b^2-4 a c} d \left (2-9 n+7 n^2\right )\right )-4 a^2 c \left (\sqrt {b^2-4 a c} e \left (1-4 n+3 n^2\right )+2 c d \left (1-6 n+8 n^2\right )\right )\right )\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{4 a^2 \left (b^2-4 a c\right )^{5/2} n^2}\\ &=\frac {x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{2 a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )^2}+\frac {x \left (a b^3 e-4 a^2 c^2 d (1-4 n)+5 a b^2 c d (1-3 n)-2 a^2 b c e (2-3 n)-b^4 d (1-2 n)+c \left (a b^2 e+2 a b c d (2-7 n)-4 a^2 c e (1-3 n)-b^3 d (1-2 n)\right ) x^n\right )}{2 a^2 \left (b^2-4 a c\right )^2 n^2 \left (a+b x^n+c x^{2 n}\right )}-\frac {c \left (a b^2 \left (\sqrt {b^2-4 a c} e+6 c d (1-3 n)\right ) (1-n)+b^3 \left (a e-\sqrt {b^2-4 a c} d (1-2 n)\right ) (1-n)-b^4 d \left (1-3 n+2 n^2\right )-2 a b c \left (2 a e \left (1-n-3 n^2\right )-\sqrt {b^2-4 a c} d \left (2-9 n+7 n^2\right )\right )-4 a^2 c \left (\sqrt {b^2-4 a c} e \left (1-4 n+3 n^2\right )+2 c d \left (1-6 n+8 n^2\right )\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{5/2} \left (b-\sqrt {b^2-4 a c}\right ) n^2}-\frac {c \left (a b^2 \left (\sqrt {b^2-4 a c} e-6 c d (1-3 n)\right ) (1-n)-b^3 \left (a e+\sqrt {b^2-4 a c} d (1-2 n)\right ) (1-n)+b^4 d \left (1-3 n+2 n^2\right )+2 a b c \left (2 a e \left (1-n-3 n^2\right )+\sqrt {b^2-4 a c} d \left (2-9 n+7 n^2\right )\right )-4 a^2 c \left (\sqrt {b^2-4 a c} e \left (1-4 n+3 n^2\right )-2 c d \left (1-6 n+8 n^2\right )\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{5/2} \left (b+\sqrt {b^2-4 a c}\right ) n^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(8593\) vs. \(2(713)=1426\).
time = 6.77, size = 8593, normalized size = 12.05 \begin {gather*} \text {Result too large to show} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \frac {d +e \,x^{n}}{\left (a +b \,x^{n}+c \,x^{2 n}\right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {d+e\,x^n}{{\left (a+b\,x^n+c\,x^{2\,n}\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________